import req from '@/http/http'
import {getServer} from '@/http/AppApi'

let ZHPQ_SERVER = getServer()

// 综治中心组织
// 修改
export const updateComprehensiveControl = data => {
  let path = ZHPQ_SERVER + '/comprehensiveControl/' + data.id
  return req.put(path, data)
}
// 删除
export const delComprehensiveControl = data => {
  let path = ZHPQ_SERVER + '/comprehensiveControl/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getComprehensiveControl = param => {
  let path = ZHPQ_SERVER + '/comprehensiveControl'
  return req.get(path, param)
}
// 新增
export const createComprehensiveControl = data => {
  let path = ZHPQ_SERVER + '/comprehensiveControl/'
  return req.post(path, data)
}
// 综治组织树
export const getCompConcrolTree = data => {
  let path = ZHPQ_SERVER + '/comprehensiveControl/tree'
  return req.get(path, data)
}

// 综治中心队伍
// 修改
export const updateComprehensiveMember = data => {
  let path = ZHPQ_SERVER + '/comprehensiveMember/' + data.id
  return req.put(path, data)
}
// 删除
export const delComprehensiveMember = data => {
  let path = ZHPQ_SERVER + '/comprehensiveMember/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const getComprehensiveMember = param => {
  let path = ZHPQ_SERVER + '/comprehensiveMember'
  return req.get(path, param)
}
// 新增
export const createComprehensiveMember = data => {
  let path = ZHPQ_SERVER + '/comprehensiveMember/'
  return req.post(path, data)
}
// 获取 查询 分页
export const getComprehensiveMemberDetail = id => {
  let path = ZHPQ_SERVER + '/comprehensiveMember/' + id
  return req.get(path)
}

// 综治视联网中心
// 修改
export const updateCenterVideo = data => {
  let path = ZHPQ_SERVER + '/centerVideo/' + data.id
  return req.put(path, data)
}
// 删除
export const delCenterVideo = data => {
  let path = ZHPQ_SERVER + '/centerVideo/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const findCenterVideo = param => {
  let path = ZHPQ_SERVER + '/centerVideo'
  return req.get(path, param)
}
// 新增
export const createCenterVideo = data => {
  let path = ZHPQ_SERVER + '/centerVideo/'
  return req.post(path, data)
}
// 群防群治组织
// 修改
export const updateGroupDefense = data => {
  let path = ZHPQ_SERVER + '/groupDefense/' + data.id
  return req.put(path, data)
}
// 删除
export const delGroupDefense = data => {
  let path = ZHPQ_SERVER + '/groupDefense/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const findGroupDefense = param => {
  let path = ZHPQ_SERVER + '/groupDefense'
  return req.get(path, param)
}
// 通过id查询
export const getGroupDefense = id => {
  let path = ZHPQ_SERVER + '/groupDefense/' + id
  return req.get(path)
}
// 新增
export const createGroupDefense = data => {
  let path = ZHPQ_SERVER + '/groupDefense/'
  return req.post(path, data)
}
// 查询所有
export const findGroupDefenseList = regionId => {
  let path = regionId ? ZHPQ_SERVER + '/groupDefense/list?regionId=' + regionId : ZHPQ_SERVER + '/groupDefense/list'
  return req.get(path)
}
// 群防群治队伍
// 修改
export const updateGroupDenseMember = data => {
  let path = ZHPQ_SERVER + '/groupDenseMember/' + data.id
  return req.put(path, data)
}
// 删除
export const delGroupDenseMember = data => {
  let path = ZHPQ_SERVER + '/groupDenseMember/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const findGroupDenseMember = param => {
  let path = ZHPQ_SERVER + '/groupDenseMember'
  return req.get(path, param)
}
// 新增
export const createGroupDenseMember = data => {
  let path = ZHPQ_SERVER + '/groupDenseMember/'
  return req.post(path, data)
}
// 通过id查询
export const getGroupDenseMember = id => {
  let path = ZHPQ_SERVER + '/groupDenseMember/' + id
  return req.get(path)
}

// 城乡社区公共安全视频监控
// 修改
export const updateCountrysideVideo = data => {
  let path = ZHPQ_SERVER + '/countrysideVideo/' + data.id
  return req.put(path, data)
}
// 删除
export const delCountrysideVideo = data => {
  let path = ZHPQ_SERVER + '/countrysideVideo/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const findCountrysideVideo = param => {
  let path = ZHPQ_SERVER + '/countrysideVideo'
  return req.get(path, param)
}
// 新增
export const createCountrysideVideo = data => {
  let path = ZHPQ_SERVER + '/countrysideVideo/'
  return req.post(path, data)
}
// 综治领导责任制
// 修改
export const updateLeaderDuty = data => {
  let path = ZHPQ_SERVER + '/leaderDuty/' + data.id
  return req.put(path, data)
}
// 删除
export const delLeaderDuty = data => {
  let path = ZHPQ_SERVER + '/leaderDuty/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const findLeaderDuty = param => {
  let path = ZHPQ_SERVER + '/leaderDuty'
  return req.get(path, param)
}
// 新增
export const createLeaderDuty = data => {
  let path = ZHPQ_SERVER + '/leaderDuty/'
  return req.post(path, data)
}
